<template>
  <div>
    <div @mouseover="drawerOpen" class="navigation-button"></div>
    <div class="nav-top" ref="drawerBody" style="left: -1205px">
      <div class="nav-body">
        <div class="nav-bg" @mouseleave="drawerClose">
          <div class="nav-button" @click="jumpRoute('ChemicalIndustry','产业总览')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <div class="nav-bg-box-right nav-bg-box-right1"></div>
              <!-- <img src="../assets/img/industry/Industry overview.png" alt="" /> -->
            </div>
            <div class="nav-bg-box-right" :class="num == 0 ? 'active' : ''">
              <p>产业总览</p>
            </div>
          </div>

            <div class="nav-button" @click="jumpRoute('zfoperationalmonitoring','产业运行监测')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img
                src="../assets/img/industry/emergency managemen.png"
                alt=""
              />-->

              <div class="nav-bg-box-right nav-bg-box-right6"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 5 ? 'active' : ''">
              <p>产业运行监测</p>
            </div>
          </div>
            <div class="nav-button" @click="jumpRoute('zfPerMuBenefitTwo','亩均效益')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <div class="nav-bg-box-right nav-bg-box-right2"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 1 ? 'active' : ''">
              <p>亩均效益</p>
            </div>
          </div>

             <div class="nav-button" @click="jumpRoute('zfIndustrialChainMapTwo','产业链图谱')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img src="../assets/img/industry/industry chain.png" alt="" /> -->
              <div class="nav-bg-box-right nav-bg-box-right10"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 9 ? 'active' : ''">
              <p>产业链图谱</p>
            </div>
          </div>
               <div class="nav-button" @click="jumpRoute('zfParkOverviewTwo','园区管理')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <div class="nav-bg-box-right nav-bg-box-right3"></div>
              <!-- <img src="../assets/img/industry/The overview.png" alt="" /> -->
            </div>
            <div class="nav-bg-box-right" :class="num == 2 ? 'active' : ''">
              <p>园区管理</p>
            </div>
          </div>
          <div class="nav-button" @click="jumpRoute('zfSafeAndContingency','安全总览')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img src="../assets/img/industry/work safety.png" alt="" /> -->
              <div class="nav-bg-box-right nav-bg-box-right5"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 4 ? 'active' : ''">
              <p>安全总览</p>
            </div>
          </div>

          <div class="nav-button">
            <!-- <div class="nav-button" @click="jumpRoute('zfDangerousGoodsTwo','危化品总览')"> -->
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img src="../assets/img/industry/BTTMS.png" alt="" /> -->
              <div class="nav-bg-box-right nav-bg-box-right7"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 6 ? 'active' : ''">
              <p>危化品总览</p>
            </div>
          </div>
          <div class="nav-button">
            <!-- <div class="nav-button" @click="jumpRoute('zfEnvironmentalConservationTwo','环境保护')"> -->
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img
                src="../assets/img/industry/environmental protection.png"
                alt=""
              />-->
              <div class="nav-bg-box-right nav-bg-box-right8"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 7 ? 'active' : ''">
              <p>环境保护</p>
            </div>
          </div>
            <div class="nav-button" @click="jumpRoute('zfDiagnosticEvaluationTwo','智能制造诊断评估')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img src="../assets/img/industry/TFDAI.png" alt="" />

              -->
              <div class="nav-bg-box-right nav-bg-box-right4"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 3 ? 'active' : ''">
              <p>智能制造诊断评估</p>
            </div>
          </div>
          <div class="nav-button" @click="jumpRoute('zfDataSharingTwo','数据共享')">
            <div class="nav-bg-box">
              <div class="nav-bg-box-left"></div>
              <!-- <img src="../assets/img/industry/DS.png" alt="" /> -->
              <div class="nav-bg-box-right nav-bg-box-right9"></div>
            </div>
            <div class="nav-bg-box-right" :class="num == 8 ? 'active' : ''">
              <p>数据共享</p>
            </div>
          </div>

        </div>
      </div>
    </div>
  </div>
</template>
<script>
</script>
<script>
import { buriedPoint } from '@/utils/user'
export default {
  data() {
    return {
      drawer: false,
      num: 0,
    }
  },
  beforeMount() {
    this.num = this.$route.meta.num
  },
  methods: {
    jumpRoute(name, app_name) {
      buriedPoint(app_name)
      this.$router.push({ name: name })
    },
    drawerOpen() {
      this.$refs.drawerBody.style.left = '200px'
    },
    drawerClose() {
      this.$refs.drawerBody.style.left = '-1205px'
    },
  },
}
</script>
<style lang="scss" scoped>
.navigation-button {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 20px;
  height: 100%;
  opacity: 0;
}
.nav-top {
  display: table;
  height: 100%;
  width: 1205px;
  position: fixed;
  top: 0px;
  z-index: 1000;
  transition: left 1s;
  z-index: 999999999999999;
}
.nav-body {
  width: 100%;
  display: table-cell;
  vertical-align: middle;
}
.nav-bg {
  width: 100%;
  height: 416px;
  background-image: url('../assets/img/industry/bj3.png');
  background-size: 100% 100%;
  padding: 40px 30px;
  margin: 0 auto;
}
.nav-button {
  text-align: center;
  width: 20%;
  height: 50%;
  font-size: 12px;
  color: #ffffff;
  float: left;
  display: inline-table;
  cursor: pointer;

  .nav-bg-box {
    width: 120px;
    height: 115px;
    line-height: 115px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;

    img {
      width: 86px;
      height: 86px;
      z-index: 10;
    }
    .nav-bg-box-right {
      width: 86px;
      height: 86px;
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      margin: auto;

      z-index: 1909;
    }
    .nav-bg-box-left {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      animation: mymove1 10s linear infinite;
      z-index: 10;
      // -webkit-animation:changeright 6s linear infinite;
      background: url('../assets/img/industry/button1.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right1 {
      background: url('../assets/img/industry/Industry overview.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right2 {
      background: url('../assets/img/industry/Peracre overview.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right3 {
      background: url('../assets/img/industry/The overview.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right4 {
      background: url('../assets/img/industry/TFDAI.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right5 {
      background: url('../assets/img/industry/work safety.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right6 {
      background: url('../assets/img/industry/emergency managemen.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right7 {
      background: url('../assets/img/industry/BTTMS.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right8 {
      background: url('../assets/img/industry/environmental protection.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right9 {
      background: url('../assets/img/industry/DS.png');
      background-size: 100% 100%;
    }
    .nav-bg-box-right10 {
      background: url('../assets/img/industry/industry chain.png');
      background-size: 100% 100%;
    }
  }
  @keyframes mymove1 {
    0% {
      -webkit-transform: rotate(0deg);
    }

    50% {
      -webkit-transform: rotate(180deg);
    }
    100% {
      -webkit-transform: rotate(360deg);
    }
  }
  .nav-bg-box-right {
    width: 120px;
    height: 50px;
    line-height: 40px;
    margin: 0 auto;
    background: url('../assets/img/industry/tab1.png');
    background-size: 100% 100%;
  }
}

.active {
  background: url('../assets/img/industry/tab2.png') !important;
  background-size: 100% 100% !important;
  p {
    color: #ffffff;
    background: linear-gradient(0deg, #ffca12 0%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}
//work safety
</style>
